package org.mozhu.mboot.admin.maintain.notification.repository;

import org.mozhu.mboot.admin.maintain.notification.entity.Notification;
import org.mozhu.mboot.core.data.BaseRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * 通知 - 持久化层接口
 * 
 * @author ZhangPei
 */
public interface NotificationRepository extends BaseRepository<Notification, Long> {

	@Query("select count(o) from Notification o where read=false and userId = ?1")
	long countUnread(Long currentUserId);
}
